package book;

public class BookList {
    private Book[] books;
    private int usedSize;
    public BookList(){
        this.books=new Book[10];
        this.books[0]=new Book("恶意","东野圭吾",20,"小说");
        this.books[1]=new Book("嫌疑人x的献身","东野圭吾",18,"小说");
        this.books[2]=new Book("我们生活在巨大的差距里","余华",15,"散文");
        this.usedSize=3;
    }

    public void setBooks(int pos,Book book) {
        books[pos] = book;
    }


    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public Book[] getBooks() {
        return books;
    }

    public int getUsedSize() {
        return usedSize;
    }
   public Book getBook(int pos){
        return books[pos];
   }
}
